<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:useBean id="f4" class="test.StudentTableBean" scope="request"/>
<jsp:setProperty property="*" name="f4"/>
<jsp:setProperty property="dbFName" name="f4" value="studentID,name,phone"/>
<!-- 若是 call db 則要改為 jspDb -->

${f4.exe}


<!-- ----------- 以下為 HTML View 把form傳回去 --------------- -->
<form name="form_f4">
	<input name="jheader" type="hidden" value="${f4.jheader}">
	<input name="pageSize" type="hidden" value="${f4.pageSize}">
	<input name="nowPage" type="hidden" value="${f4.nowPage}">
	<input name="toPage" type="hidden" value="${f4.toPage}">
	<input name="nextPage" type="hidden" value="${f4.nextPage}">
	<input name="sortName" type="hidden" value="${f4.sortName}">
	<input name="sortNowName" type="hidden" value="${f4.sortNowName}">
	<input name="sortNowValue" type="hidden" value="${f4.sortNowValue}">
	<input name="pk" type="hidden" value="${f4.pk}">
	<input name="command" type="hidden" value="${f4.command}">
	<input name="number" type="hidden" value="${f4.number }">
	<input name="sortStatus" type="hidden" value="${f4.sortStatus }">
	<input name="colSize" type="hidden" value="${f4.colSize }">
	<input name="divId" type="hidden" value="${f4.divId }">
	<input name="myQuery" type="text" value="${param.myQuery }">
  <table width="100%" border="1">
    
    <!-- for -->
    <tr>
      <td>nameAdd</td>
      <td><label>
        <input type="text" name="nameAdd" />
      </label></td>
    </tr>
    <!-- for end -->

    <!-- for -->
    <tr>
      <td>phoneAdd</td>
      <td><label>
        <input type="text" name="phoneAdd" />
      </label></td>
    </tr>
    <!-- for end -->


    <tr>
      <td colspan="2"><label>
        <input type="button" name="button" value="新增" onclick="jotherCommand_f4(-1,'add')"/>
      	${f4.addErr}
      	<!--  -1是pk,若要用活的就'${f4.jsortNames[0]}')  -->
      	<input type="button" name="button" value="自訂新增" onclick="jotherCommand_f4(-1,'jessieAdd')"/>
      </label></td>
    </tr>
  </table>	
  	
	
	<table width="100%" border="1" class="fontstyle_f4">
	  <tr>
	  		<td  bgcolor="Black" class="headerTEXT_f4">
		    	流水號
		    </td>
		    
		    <!-- for jheader -->
	  		<td bgcolor="Black" class="headerTEXT_f4">
	  			<span class="myMOUSE2_f4" onclick="jsort_f4('${f4.jsortNames[0]}')">
		    		學生ID ${f4.jsortIcon[f4.jsortValues[0]]}
		    	</span>
		    </td>
		    <!-- for jheader end -->

		    <!-- for jheader -->
	  		<td bgcolor="Black" class="headerTEXT_f4">
	  			<span class="myMOUSE2_f4" onclick="jsort_f4('${f4.jsortNames[1]}')">
		    		姓名 ${f4.jsortIcon[f4.jsortValues[1]]}
		    	</span>
		    </td>
		    <!-- for jheader end -->

		    <!-- for jheader -->
	  		<td bgcolor="Black" class="headerTEXT_f4">
	  			<span class="myMOUSE2_f4" onclick="jsort_f4('${f4.jsortNames[2]}')">
		    		電話 ${f4.jsortIcon[f4.jsortValues[2]]}
		    	</span>
		    </td>
		    <!-- for jheader end -->


    		
	  		<td  bgcolor="Black" class="headerTEXT_f4">
		    	功能鍵
		    </td>
		    <!-- ---------------------------------------------------------------------------------- --> 
	  </tr>
	  <!-- table body -->
	  <!-- ---------------------------------------------------------------------------------- --> 
	<!-- for row -->
	  <tr>
	  	<td bgcolor="">${f4.pageSize * f4.nowPage + 1 + 0 - f4.pageSize}</td>
	  	
	  	<td bgcolor="">${f4.cell[0][0].htmlItem}</td>
	  	<td bgcolor="">${f4.cell[0][1].htmlItem}</td>
	  	<td bgcolor="">${f4.cell[0][2].htmlItem}</td>

	  	
  	    <td bgcolor="">
            <c:if test="${f4.cell[0][0].showYesNo}">
			    <span class="myMOUSE_f4" onclick="jyes_f4('${f4.cell[0][0].value}')">yes |</span> 
			    <span class="myMOUSE_f4" onclick="jno_f4('${f4.cell[0][0].value}')">no</span>
		    </c:if>
		    <c:if test="${f4.cell[0][0].showYesNo==false}">
			    <span class="myMOUSE_f4" onclick="jedit_f4('${f4.cell[0][0].value}')">edit |</span> 
			    <span class="myMOUSE_f4" onclick="jdel_f4('${f4.cell[0][0].value}')">delete</span> 
		    </c:if>
           </td>
	  </tr>	  
    <!-- for row end -->
	<!-- for row -->
	  <tr>
	  	<td bgcolor="#999999">${f4.pageSize * f4.nowPage + 1 + 1 - f4.pageSize}</td>
	  	
	  	<td bgcolor="#999999">${f4.cell[1][0].htmlItem}</td>
	  	<td bgcolor="#999999">${f4.cell[1][1].htmlItem}</td>
	  	<td bgcolor="#999999">${f4.cell[1][2].htmlItem}</td>

	  	
  	    <td bgcolor="#999999">
            <c:if test="${f4.cell[1][0].showYesNo}">
			    <span class="myMOUSE_f4" onclick="jyes_f4('${f4.cell[1][0].value}')">yes |</span> 
			    <span class="myMOUSE_f4" onclick="jno_f4('${f4.cell[1][0].value}')">no</span>
		    </c:if>
		    <c:if test="${f4.cell[1][0].showYesNo==false}">
			    <span class="myMOUSE_f4" onclick="jedit_f4('${f4.cell[1][0].value}')">edit |</span> 
			    <span class="myMOUSE_f4" onclick="jdel_f4('${f4.cell[1][0].value}')">delete</span> 
		    </c:if>
           </td>
	  </tr>	  
    <!-- for row end -->

	  <!-- ---------------------------------------------------------------------------------- --> 
	  
	  <tr>
	    <td colspan="5">
	    	<span class="myMOUSE_f4" onclick="nextPagex_f4('first')">第1頁 |</span> 
	    	<span class="myMOUSE_f4" onclick="nextPagex_f4('prev10')">上10頁 | </span> 
	    	<span class="myMOUSE_f4" onclick="nextPagex_f4('prev')">上1頁 |</span> 
	    	${f4.pageNumberList}
	    	|  
	    	<span class="myMOUSE_f4" onclick="nextPagex_f4('next')">下1頁 | </span> 
	    	<span class="myMOUSE_f4" onclick="nextPagex_f4('next10')">下10頁 | </span> 
	    	<span class="myMOUSE_f4" onclick="nextPagex_f4('last')">最末頁</span> 
	    </td>
	  </tr>
	</table>
	<c:if test="${f4.showAlert==1}">
	<span id="showAlert">${f4.showAlert}</span>
	</c:if>
</form>


